<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common.jsp"%>
<c:set var="baseUrl" value="sys/sysModule" />
<!-- 分页表单：搜索表单必须添加属性： rel="pagerForm"  -->
<%@include file="/pageParameter.jsp" %>
<div class="pageHeader" >
	<form rel="pagerForm" onsubmit="return navTabSearch(this);"  action="${ctxPath }/${baseUrl }/list" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
				    <td>模块名称： <input type="text" name="name" value="${entity.name}" /> </td>
				    <td>模块状态： 
				    </td>
                    <td>
						<select class="combox" name="status" id="combox_status">
							<option value="0" <c:if test="${entity.status==0 }">selected="selected"</c:if>>启用</option>
							<option value="1" <c:if test="${entity.status==1 }">selected="selected"</c:if>>禁用</option>
						</select>
				    </td>
                    <td>
						<div class="buttonActive">
							<div class="buttonContent">
							     <button title="查询" type="submit">查&nbsp;询</button>
							</div>
						</div>
					</td>
                 </tr>
			</table>
		</div>
	</form>
</div><!-- <div class="pageHeader"> -->
<div class="pageContent">	
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="${baseUrl }/add">
				<li>
					<a title="添加" class="add" target="dialog" 
						mask="true" width="550" height="600"  
						href="${ctxPath }/${baseUrl }/addUI" ><span>添加</span>
					</a>
				</li>
				<li class="line">line</li>
			</shiro:hasPermission>
			<shiro:hasPermission name="${baseUrl }/edit"> 
				<li>
					<a title="修改" class="edit" target="dialog"
						href="${ctxPath}/${baseUrl }/editUI?id={param_id}" 
						warn="请选择要操作的数据"
					 	mask="true" width="550" height="600"><span>修改</span></a>
				</li>
				<li class="line">line</li>
			</shiro:hasPermission>
			<shiro:hasPermission name="${baseUrl }/delete">	
				<li>
					<a title="确定要删除该记录吗？" class="delete"  target="ajaxTodo"
						href="${ctxPath}/${baseUrl }/delete?id={param_id}" 
						warn="请选择要操作的数据"><span>删除</span></a>
				</li>
				<li class="line">line</li>
			</shiro:hasPermission>	
			<shiro:hasPermission name="sys/sysResource/edit"> 
				<li>
					<a title="设计模块功能" class="icon" target="navTab" rel="editResourceByModules"
						href="${ctxPath }/sys/sysResource/listBymodule?pid={param_id}" 
						warn="请选择要操作的数据"
					 	mask="true" width="550" height="600"><span>设计模块功能</span></a>
				</li>
				<li class="line">line</li>
			</shiro:hasPermission>
		</ul>
	</div>
	<table class="table" width="101%"  layoutH="112">
		<thead>
			<tr>
				<th width="5%">序号</th>
				<th width="10%" orderField="name" class="${pageParam.orderField eq 'name' ? pageParam.orderDirection : ''}" >模块名称</th>
				<th width="5%" orderField="status" class="${pageParam.orderField eq 'status' ? pageParam.orderDirection : ''}" >状态</th><!-- 0-启用，1-禁用 -->
				<th width="5%" orderField="seq" class="${pageParam.orderField eq 'seq' ? pageParam.orderDirection : ''}" >排序序号</th>
				<th width="10%" orderField="createTime" class="${pageParam.orderField eq 'createTime' ? pageParam.orderDirection : ''}" >创建时间</th>
				<th  >备注</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="item" items="${pageBean.recordList}" varStatus="s">
				<!-- 
				当选中一行时,tr上的rel值会自动替换到url变量中.
				注意url变量名{sid_user}和tr的target="sid_user"保持一致.
				 -->
				<tr target="param_id" rel="${item.id}">
					<td>${s.index + 1}</td>
<!-- 					<td> -->
<!-- 						<a target="ajax" rel="show_resource_module" style="color: blue" -->
<!-- 							href="${ctxPath }/sys/sysResource/listBymodule?pid=${item.id}" > -->
<!-- 							【查看菜单】 -->
<!-- 						</a> -->
<!-- 					</td> -->
					<td>${item.name} </td>
					<td>
						<c:if test="${item.status==0}">启用</c:if>
						<c:if test="${item.status==1}">禁用</c:if>
					</td>
					<td>${item.seq}</td>
					<td><fmt:formatDate value="${item.createTime}"
					     pattern="yyyy-MM-dd HH:mm:ss" />
			        </td>
			        <td>${item.remark}</td>
				</tr>
			</c:forEach>
			<c:if test="${pageBean.totalCount==0}"><tr><td>暂无数据</td></tr></c:if>
		</tbody>
	</table>
	<%@include file="/pageBar.jsp" %>
</div>
